package com.godz.controller.index2;

import com.godz.mapper.index2TeacherMapper;
import com.godz.pojo.index2Teacher;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class teacherController {
    final
    index2TeacherMapper teacherMapper;//我的恩师

    public teacherController(index2TeacherMapper teacherMapper) {
        this.teacherMapper = teacherMapper;
    }

    @RequestMapping("/index2/teacher")
    public String PriceCon(Model model) {
        List<index2Teacher> teachers = teacherMapper.selectList(null);
        model.addAttribute("teachers", teachers);
        return "index2LearnR";
    }
}
